/***********************************************************************
 * Module:  Grade.java
 * Author:  penwei
 * Purpose: 班级
 ***********************************************************************/

package cn.hdmis.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 
 * 项目名称：hdmis1.1
 * 类名称：Grade
 * 类描述：班级
 * 创建人：Administrator
 * 创建时间：2013-2-13 下午02:49:06
 * 修改人：Administrator
 * 修改时间：2013-2-13 下午02:49:06
 * 修改备注：
 * @version 
 * 
 */
public class Grade implements java.io.Serializable {
	/**	班级ID */
	private Integer id;
	/**	班级名称 */
	private String name;
	/**	班级类型 */
	private Integer type;
	/**	班级启用 */
	private Boolean disabled;
	/**	禁用日期 */
	private Date disableDate;
	/**	教室 */
	private ClassRoom classRoom;
	
	private Set<StudentGrade> studentGradeSet = new HashSet<StudentGrade>(); 
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Boolean getDisabled() {
		return disabled;
	}
	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}
	public Date getDisableDate() {
		return disableDate;
	}
	public void setDisableDate(Date disableDate) {
		this.disableDate = disableDate;
	}
	public ClassRoom getClassRoom() {
		return classRoom;
	}
	public void setClassRoom(ClassRoom classRoom) {
		this.classRoom = classRoom;
	}
	public void setStudentGradeSet(Set<StudentGrade> studentGradeSet) {
		this.studentGradeSet = studentGradeSet;
	}
	public Set<StudentGrade> getStudentGradeSet() {
		return studentGradeSet;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Grade other = (Grade) obj;
		if (classRoom == null) {
			if (other.classRoom != null)
				return false;
		} else if (!classRoom.equals(other.classRoom))
			return false;
		if (disableDate == null) {
			if (other.disableDate != null)
				return false;
		} else if (!disableDate.equals(other.disableDate))
			return false;
		if (disabled == null) {
			if (other.disabled != null)
				return false;
		} else if (!disabled.equals(other.disabled))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

}